<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<link rel="stylesheet" type="text/css" href="${facesContext.externalContext.request.contextPath}/Paginas/CSS/styles.css" />

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<h:panelGrid id="formCadArtistas" columns="2" styleClass="conteudo">

    <h:panelGroup>
        <h:outputLabel value="Nome do artista :" /><br>
        <h:inputText id="Nome_do_artista" size="12" value="#{cadastrosAppCotroller.artistaViewHelper.artista.nomeDoArtista}" required="true" />

    </h:panelGroup>

    <h:panelGroup>
        <h:outputLabel value="Local de Origem:" /><br>
        <h:inputText id="Local_de_origem" size="12" value="#{cadastrosAppCotroller.artistaViewHelper.artista.localDeOrigem}" required="true" />

    </h:panelGroup>

    <h:panelGroup>
        <h:outputLabel value="Data de Criacao:" /><br>
        <h:inputText id="Data_de_criacao" size="12" value="#{cadastrosAppCotroller.artistaViewHelper.artista.dataDeCricao}" required="true" >
            <f:convertDateTime pattern="dd/MM/yyyy" />
        </h:inputText>
    </h:panelGroup>

    <h:panelGroup>
        <h:outputLabel value="Generos de Artistas" /><br>
        <h:selectOneListbox id="Genero_do_artista" required="true" value="#{cadastrosAppCotroller.artistaViewHelper.artista.generoDoArtista}" >
            <f:selectItems value="#{cadastrosAppCotroller.artistaViewHelper.generosDeArtistas}" />
        </h:selectOneListbox>
    </h:panelGroup>

    <h:panelGroup>
        <h:outputLabel value="Descricao:" /><br>
        <h:inputTextarea  id="Descricao_so_Artista" rows="10" cols="20"  value="#{cadastrosAppCotroller.artistaViewHelper.artista.descricaoDoArtista}" required="true" />

    </h:panelGroup>

    <h:panelGroup>
        <h:panelGroup>
            <h:outputLabel value="Artistas Parecidos:" /><br>
            <h:selectManyListbox size="5" id="Artistas_Parecidos"  value="#{cadastrosAppCotroller.artistaViewHelper.artistasParecidos}">
                <f:selectItems value="#{cadastrosAppCotroller.artistaViewHelper.obterListaDeArtistas}" />
            </h:selectManyListbox>
        </h:panelGroup>
        <br><br>
        <h:panelGroup>
            <h:outputLabel value="Artistas de Influencia:" /><br>
            <h:selectManyListbox  id="Artistas_de_Influencia" size="5" value="#{cadastrosAppCotroller.artistaViewHelper.artistasDeInfluencia}">
                <f:selectItems value="#{cadastrosAppCotroller.artistaViewHelper.obterListaDeArtistas}" />
            </h:selectManyListbox>
        </h:panelGroup>

    </h:panelGroup>

    <h:commandButton id="cbLimpar" immediate="true" styleClass="botoesMenu" action="#{cadastrosAppCotroller.limparCampos}" value="Limpar" />

    <h:commandButton id="cbEnviar" styleClass="botoesMenu" action="#{cadastrosAppCotroller.cadastrarArtista}" value="Cadastrar" />


</h:panelGrid>